﻿@model VoiceAd.Models.RegisterModel
@{
    ViewBag.Title = "Thêm mới user";
    Layout = "~/Views/Shared/_LayoutAdmin.cshtml";
}
<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
<h2>@ViewBag.Title</h2>
@using (Html.BeginForm())
{
    @Html.ValidationSummary(true, "Account creation was unsuccessful. Please correct the errors and try again.")
    <div class="editor-label">
        Tên đăng nhập
    </div>
    <div class="editor-field">
        @Html.EditorFor(model => model.UserName)
        @Html.ValidationMessageFor(model => model.UserName)
    </div>
    <div class="editor-label">
        Email
    </div>
    <div class="editor-field">
        @Html.EditorFor(model => model.Email)
        @Html.ValidationMessageFor(model => model.Email)
    </div>
    <div class="editor-label">
        @Html.LabelFor(m => m.Password)
    </div>
    <div class="editor-field">
        @Html.PasswordFor(m => m.Password)
        @Html.ValidationMessageFor(m => m.Password)
    </div>
    <div class="editor-label">
        @Html.LabelFor(m => m.ConfirmPassword)
    </div>
    <div class="editor-field">
        @Html.PasswordFor(m => m.ConfirmPassword)
        @Html.ValidationMessageFor(m => m.ConfirmPassword)
    </div>
    <div class="editor-label">
        Quyền user
    </div>
    <div class="editor-field">
        @Html.DropDownList("RoleId", (SelectList)ViewBag.Roles, new { style = "width: 300px" })
    </div>
    
    <p>
        <input type="submit" value="Lưu" />
    </p>
}

<br />
<div>
    @Html.ActionLink("Trang chủ", "ManagesUsers")
</div>
